﻿


using Csla;
using Csla.Data;
using System;
using System.Linq;



namespace Kiosk.Library
{
	#region CellProvider
	[Serializable()]
	public partial class CellProviderInfo : ReadOnlyBase<CellProviderInfo>
	{
		public Guid CellProviderID
		{ get; internal set; }
		public string Name
		{ get; internal set; }
		public string SmsGateway
		{ get; internal set; }
			
		private CellProviderInfo()
		{
		  // require use of factory methods
		}
		
		public override string ToString()
		{
			return CellProviderID.ToString();
		}

		internal CellProviderInfo(Guid CellProviderID, string Name, string SmsGateway)
		{
			this.CellProviderID = CellProviderID;
			this.Name = Name;
			this.SmsGateway = SmsGateway;

		}
		
		
		public static CellProviderInfo GetCellProviderInfoById(Guid ID)
		{
			return DataPortal.Fetch<CellProviderInfo>(new SingleCriteria<CellProviderInfo, Guid>(ID));		
		}
		
		private void DataPortal_Fetch(SingleCriteria<CellProviderInfo, Guid> criteria)
		{
            FetchSingleById(criteria.Value);
		}

		private void FetchSingleById(Guid Id)
		{
		  using (var ctx = ContextManager<Kiosk.Data.KioskDataContext>.GetManager(Database.ConnectionString))
		  {
			var data = ctx.DataContext.CellProvider.Single(t => t.CellProviderID == Id);
			this.CellProviderID = data.CellProviderID;
			this.Name = data.Name;
			this.SmsGateway = data.SmsGateway;

		  }
		}


	}
	#endregion
	#region Employee
	[Serializable()]
	public partial class EmployeeInfo : ReadOnlyBase<EmployeeInfo>
	{
		public Guid EmployeeID
		{ get; internal set; }
		public string DomainName
		{ get; internal set; }
		public string FirstName
		{ get; internal set; }
		public string LastName
		{ get; internal set; }
		public Guid LocationID
		{ get; internal set; }
		public string Email
		{ get; internal set; }
		public string OfficePhone
		{ get; internal set; }
		public string CellPhone
		{ get; internal set; }
		public Guid CellProviderID
		{ get; internal set; }
			
		private EmployeeInfo()
		{
		  // require use of factory methods
		}
		
		public override string ToString()
		{
			return EmployeeID.ToString();
		}

		internal EmployeeInfo(Guid EmployeeID, string DomainName, string FirstName, string LastName, Guid LocationID, string Email, string OfficePhone, string CellPhone, Guid CellProviderID)
		{
			this.EmployeeID = EmployeeID;
			this.DomainName = DomainName;
			this.FirstName = FirstName;
			this.LastName = LastName;
			this.LocationID = LocationID;
			this.Email = Email;
			this.OfficePhone = OfficePhone;
			this.CellPhone = CellPhone;
			this.CellProviderID = CellProviderID;

		}
		
		
		public static EmployeeInfo GetEmployeeInfoById(Guid ID)
		{
			return DataPortal.Fetch<EmployeeInfo>(new SingleCriteria<EmployeeInfo, Guid>(ID));		
		}
		
		private void DataPortal_Fetch(SingleCriteria<EmployeeInfo, Guid> criteria)
		{
            FetchSingleById(criteria.Value);
		}

		private void FetchSingleById(Guid Id)
		{
		  using (var ctx = ContextManager<Kiosk.Data.KioskDataContext>.GetManager(Database.ConnectionString))
		  {
			var data = ctx.DataContext.Employee.Single(t => t.EmployeeID == Id);
			this.EmployeeID = data.EmployeeID;
			this.DomainName = data.DomainName;
			this.FirstName = data.FirstName;
			this.LastName = data.LastName;
			this.LocationID = data.LocationID;
			this.Email = data.Email;
			this.OfficePhone = data.OfficePhone;
			this.CellPhone = data.CellPhone;
			this.CellProviderID = data.CellProviderID;

		  }
		}


	}
	#endregion
	#region Icon
	[Serializable()]
	public partial class IconInfo : ReadOnlyBase<IconInfo>
	{
		public Guid IconID
		{ get; internal set; }
		public string IconFile
		{ get; internal set; }
		public string IconKeyword
		{ get; internal set; }
			
		private IconInfo()
		{
		  // require use of factory methods
		}
		
		public override string ToString()
		{
			return IconID.ToString();
		}

		internal IconInfo(Guid IconID, string IconFile, string IconKeyword)
		{
			this.IconID = IconID;
			this.IconFile = IconFile;
			this.IconKeyword = IconKeyword;

		}
		
		
		public static IconInfo GetIconInfoById(Guid ID)
		{
			return DataPortal.Fetch<IconInfo>(new SingleCriteria<IconInfo, Guid>(ID));		
		}
		
		private void DataPortal_Fetch(SingleCriteria<IconInfo, Guid> criteria)
		{
            FetchSingleById(criteria.Value);
		}

		private void FetchSingleById(Guid Id)
		{
		  using (var ctx = ContextManager<Kiosk.Data.KioskDataContext>.GetManager(Database.ConnectionString))
		  {
			var data = ctx.DataContext.Icon.Single(t => t.IconID == Id);
			this.IconID = data.IconID;
			this.IconFile = data.IconFile;
			this.IconKeyword = data.IconKeyword;

		  }
		}


	}
	#endregion
	#region Location
	[Serializable()]
	public partial class LocationInfo : ReadOnlyBase<LocationInfo>
	{
		public Guid LocationID
		{ get; internal set; }
		public string Name
		{ get; internal set; }
		public int XCoordinate
		{ get; internal set; }
		public int YCoordinate
		{ get; internal set; }
			
		private LocationInfo()
		{
		  // require use of factory methods
		}
		
		public override string ToString()
		{
			return LocationID.ToString();
		}

		internal LocationInfo(Guid LocationID, string Name, int XCoordinate, int YCoordinate)
		{
			this.LocationID = LocationID;
			this.Name = Name;
			this.XCoordinate = XCoordinate;
			this.YCoordinate = YCoordinate;

		}
		
		
		public static LocationInfo GetLocationInfoById(Guid ID)
		{
			return DataPortal.Fetch<LocationInfo>(new SingleCriteria<LocationInfo, Guid>(ID));		
		}
		
		private void DataPortal_Fetch(SingleCriteria<LocationInfo, Guid> criteria)
		{
            FetchSingleById(criteria.Value);
		}

		private void FetchSingleById(Guid Id)
		{
		  using (var ctx = ContextManager<Kiosk.Data.KioskDataContext>.GetManager(Database.ConnectionString))
		  {
			var data = ctx.DataContext.Location.Single(t => t.LocationID == Id);
			this.LocationID = data.LocationID;
			this.Name = data.Name;
			this.XCoordinate = data.XCoordinate;
			this.YCoordinate = data.YCoordinate;

		  }
		}


	}
	#endregion
	#region Notification
	[Serializable()]
	public partial class NotificationInfo : ReadOnlyBase<NotificationInfo>
	{
		public Guid NotificationID
		{ get; internal set; }
		public Guid NotificationTypeID
		{ get; internal set; }
		public Guid LocationID
		{ get; internal set; }
		public Guid EmployeeID
		{ get; internal set; }
		public DateTime? NotificationDate
		{ get; internal set; }
		public string Title
		{ get; internal set; }
		public string Description
		{ get; internal set; }
			
		private NotificationInfo()
		{
		  // require use of factory methods
		}
		
		public override string ToString()
		{
			return NotificationID.ToString();
		}

		internal NotificationInfo(Guid NotificationID, Guid NotificationTypeID, Guid LocationID, Guid EmployeeID, DateTime? NotificationDate, string Title, string Description)
		{
			this.NotificationID = NotificationID;
			this.NotificationTypeID = NotificationTypeID;
			this.LocationID = LocationID;
			this.EmployeeID = EmployeeID;
			this.NotificationDate = NotificationDate;
			this.Title = Title;
			this.Description = Description;

		}
		
		
		public static NotificationInfo GetNotificationInfoById(Guid ID)
		{
			return DataPortal.Fetch<NotificationInfo>(new SingleCriteria<NotificationInfo, Guid>(ID));		
		}
		
		private void DataPortal_Fetch(SingleCriteria<NotificationInfo, Guid> criteria)
		{
            FetchSingleById(criteria.Value);
		}

		private void FetchSingleById(Guid Id)
		{
		  using (var ctx = ContextManager<Kiosk.Data.KioskDataContext>.GetManager(Database.ConnectionString))
		  {
			var data = ctx.DataContext.Notification.Single(t => t.NotificationID == Id);
			this.NotificationID = data.NotificationID;
			this.NotificationTypeID = data.NotificationTypeID;
			this.LocationID = data.LocationID;
			this.EmployeeID = data.EmployeeID;
			this.NotificationDate = data.NotificationDate;
			this.Title = data.Title;
			this.Description = data.Description;

		  }
		}


	}
	#endregion
	#region NotificationType
	[Serializable()]
	public partial class NotificationTypeInfo : ReadOnlyBase<NotificationTypeInfo>
	{
		public Guid NotificationTypeID
		{ get; internal set; }
		public string Name
		{ get; internal set; }
			
		private NotificationTypeInfo()
		{
		  // require use of factory methods
		}
		
		public override string ToString()
		{
			return NotificationTypeID.ToString();
		}

		internal NotificationTypeInfo(Guid NotificationTypeID, string Name)
		{
			this.NotificationTypeID = NotificationTypeID;
			this.Name = Name;

		}
		
		
		public static NotificationTypeInfo GetNotificationTypeInfoById(Guid ID)
		{
			return DataPortal.Fetch<NotificationTypeInfo>(new SingleCriteria<NotificationTypeInfo, Guid>(ID));		
		}
		
		private void DataPortal_Fetch(SingleCriteria<NotificationTypeInfo, Guid> criteria)
		{
            FetchSingleById(criteria.Value);
		}

		private void FetchSingleById(Guid Id)
		{
		  using (var ctx = ContextManager<Kiosk.Data.KioskDataContext>.GetManager(Database.ConnectionString))
		  {
			var data = ctx.DataContext.NotificationType.Single(t => t.NotificationTypeID == Id);
			this.NotificationTypeID = data.NotificationTypeID;
			this.Name = data.Name;

		  }
		}


	}
	#endregion
	#region Presentation
	[Serializable()]
	public partial class PresentationInfo : ReadOnlyBase<PresentationInfo>
	{
		public Guid PresentationID
		{ get; internal set; }
		public Guid PresentationTypeID
		{ get; internal set; }
		public Guid PresentationStatusID
		{ get; internal set; }
		public string Name
		{ get; internal set; }
			
		private PresentationInfo()
		{
		  // require use of factory methods
		}
		
		public override string ToString()
		{
			return PresentationID.ToString();
		}

		internal PresentationInfo(Guid PresentationID, Guid PresentationTypeID, Guid PresentationStatusID, string Name)
		{
			this.PresentationID = PresentationID;
			this.PresentationTypeID = PresentationTypeID;
			this.PresentationStatusID = PresentationStatusID;
			this.Name = Name;

		}
		
		
		public static PresentationInfo GetPresentationInfoById(Guid ID)
		{
			return DataPortal.Fetch<PresentationInfo>(new SingleCriteria<PresentationInfo, Guid>(ID));		
		}
		
		private void DataPortal_Fetch(SingleCriteria<PresentationInfo, Guid> criteria)
		{
            FetchSingleById(criteria.Value);
		}

		private void FetchSingleById(Guid Id)
		{
		  using (var ctx = ContextManager<Kiosk.Data.KioskDataContext>.GetManager(Database.ConnectionString))
		  {
			var data = ctx.DataContext.Presentation.Single(t => t.PresentationID == Id);
			this.PresentationID = data.PresentationID;
			this.PresentationTypeID = data.PresentationTypeID;
			this.PresentationStatusID = data.PresentationStatusID;
			this.Name = data.Name;

		  }
		}


	}
	#endregion
	#region PresentationStatus
	[Serializable()]
	public partial class PresentationStatusInfo : ReadOnlyBase<PresentationStatusInfo>
	{
		public Guid PresentationStatusID
		{ get; internal set; }
		public string Name
		{ get; internal set; }
			
		private PresentationStatusInfo()
		{
		  // require use of factory methods
		}
		
		public override string ToString()
		{
			return PresentationStatusID.ToString();
		}

		internal PresentationStatusInfo(Guid PresentationStatusID, string Name)
		{
			this.PresentationStatusID = PresentationStatusID;
			this.Name = Name;

		}
		
		
		public static PresentationStatusInfo GetPresentationStatusInfoById(Guid ID)
		{
			return DataPortal.Fetch<PresentationStatusInfo>(new SingleCriteria<PresentationStatusInfo, Guid>(ID));		
		}
		
		private void DataPortal_Fetch(SingleCriteria<PresentationStatusInfo, Guid> criteria)
		{
            FetchSingleById(criteria.Value);
		}

		private void FetchSingleById(Guid Id)
		{
		  using (var ctx = ContextManager<Kiosk.Data.KioskDataContext>.GetManager(Database.ConnectionString))
		  {
			var data = ctx.DataContext.PresentationStatus.Single(t => t.PresentationStatusID == Id);
			this.PresentationStatusID = data.PresentationStatusID;
			this.Name = data.Name;

		  }
		}


	}
	#endregion
	#region PresentationType
	[Serializable()]
	public partial class PresentationTypeInfo : ReadOnlyBase<PresentationTypeInfo>
	{
		public Guid PresentationTypeID
		{ get; internal set; }
		public string Name
		{ get; internal set; }
			
		private PresentationTypeInfo()
		{
		  // require use of factory methods
		}
		
		public override string ToString()
		{
			return PresentationTypeID.ToString();
		}

		internal PresentationTypeInfo(Guid PresentationTypeID, string Name)
		{
			this.PresentationTypeID = PresentationTypeID;
			this.Name = Name;

		}
		
		
		public static PresentationTypeInfo GetPresentationTypeInfoById(Guid ID)
		{
			return DataPortal.Fetch<PresentationTypeInfo>(new SingleCriteria<PresentationTypeInfo, Guid>(ID));		
		}
		
		private void DataPortal_Fetch(SingleCriteria<PresentationTypeInfo, Guid> criteria)
		{
            FetchSingleById(criteria.Value);
		}

		private void FetchSingleById(Guid Id)
		{
		  using (var ctx = ContextManager<Kiosk.Data.KioskDataContext>.GetManager(Database.ConnectionString))
		  {
			var data = ctx.DataContext.PresentationType.Single(t => t.PresentationTypeID == Id);
			this.PresentationTypeID = data.PresentationTypeID;
			this.Name = data.Name;

		  }
		}


	}
	#endregion
	#region Slide
	[Serializable()]
	public partial class SlideInfo : ReadOnlyBase<SlideInfo>
	{
		public Guid SlideID
		{ get; internal set; }
		public Guid PresentationID
		{ get; internal set; }
		public string Title
		{ get; internal set; }
		public string Location
		{ get; internal set; }
		public int Order
		{ get; internal set; }
			
		private SlideInfo()
		{
		  // require use of factory methods
		}
		
		public override string ToString()
		{
			return SlideID.ToString();
		}

		internal SlideInfo(Guid SlideID, Guid PresentationID, string Title, string Location, int Order)
		{
			this.SlideID = SlideID;
			this.PresentationID = PresentationID;
			this.Title = Title;
			this.Location = Location;
			this.Order = Order;

		}
		
		
		public static SlideInfo GetSlideInfoById(Guid ID)
		{
			return DataPortal.Fetch<SlideInfo>(new SingleCriteria<SlideInfo, Guid>(ID));		
		}
		
		private void DataPortal_Fetch(SingleCriteria<SlideInfo, Guid> criteria)
		{
            FetchSingleById(criteria.Value);
		}

		private void FetchSingleById(Guid Id)
		{
		  using (var ctx = ContextManager<Kiosk.Data.KioskDataContext>.GetManager(Database.ConnectionString))
		  {
			var data = ctx.DataContext.Slide.Single(t => t.SlideID == Id);
			this.SlideID = data.SlideID;
			this.PresentationID = data.PresentationID;
			this.Title = data.Title;
			this.Location = data.Location;
			this.Order = data.Order;

		  }
		}


	}
	#endregion
}

